<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>

<%--<a href="<%=request.getContextPath() %>/admin/res/list" class="admin_link">资源管理</a>--%>
<%--<a href="<%=request.getContextPath() %>/admin/role/list" class="admin_link">角色管理</a>--%>
<%--<a href="<%=request.getContextPath() %>/admin/user/list" class="admin_link">用户管理</a>--%>
<%--<a href="<%=request.getContextPath() %>/logout">退出系统</a>--%>
<%--欢迎 使用我们的系统!--%>
<%--<a href="<%=request.getContextPath() %>/login/login">登录系统</a>--%>
<span>
<shiro:authenticated>
    欢迎 <shiro:principal property="nickname"/> 使用我们的系统!
    <shiro:hasPermission name="/admin/user/list">
        <a href="<%=request.getContextPath() %>/admin/user/list" class="admin_link">用户管理</a>
    </shiro:hasPermission>
    <shiro:hasPermission name="/admin/role/list">
        <a href="<%=request.getContextPath() %>/admin/role/list" class="admin_link">角色管理</a>
    </shiro:hasPermission>
    <shiro:hasPermission name="/admin/res/list">
        <a href="<%=request.getContextPath() %>/admin/res/list" class="admin_link">资源管理</a>
    </shiro:hasPermission>
    <shiro:hasPermission name="/admin/category/list">
        <a href="<%=request.getContextPath() %>/admin/category/list" class="admin_link">商品类别管理</a>
    </shiro:hasPermission>
    <shiro:hasPermission name="/admin/product/list">
        <a href="<%=request.getContextPath() %>/user/product/list" class="admin_link">商品管理</a>
    </shiro:hasPermission>
    <a href="<%=request.getContextPath() %>/user/order/show">查看购物车</a>
    <a href="<%=request.getContextPath() %>/user/product/list" class="admin_link">商品查看</a>
    <a href="<%=request.getContextPath() %>/admin/user/updateSelf">个人信息修改</a>
    <a href="<%=request.getContextPath() %>/admin/user/show">个人信息查询</a>
    <a href="<%=request.getContextPath() %>/logout">退出系统</a>
</shiro:authenticated>
<shiro:guest>
    <a href="<%=request.getContextPath() %>/login/login">登录系统</a>
    <a href="<%=request.getContextPath() %>/user/order/show">查看购物车</a>
    <a href="<%=request.getContextPath() %>/user/product/list" class="admin_link">商品查看</a>
</shiro:guest>
</span>
<hr/>